const mongoose = require('mongoose');//引入mongoose
const questionsSchema = new mongoose.Schema({
    analysis:String,
    question:String,
    RightKey:String,
    score:Number,
    answer:Array,
    KnowledgePointId: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'knowledgePointsModel'
    }
});

const questionsModel = mongoose.model("questionsModel", questionsSchema, "questions");
module.exports = {questionsModel}